<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <p>guess</p>
  <p>what</p>
  <p>guess</p>
  <p>what</p>
  <p>guess</p>
  <p>what</p>
  <p>guess</p>
  <p>what</p>
  <p>guess</p>
  <p>what</p>

  <script src="https://d3js.org/d3.v5.js"></script>
  <script>
    const p = d3.selectAll('p')
      .style('color', () => 'hsl(' + Math.random() * 360 + ",100%,50%)")
      .data([12, 14, 16, 18, 20, 22, 24]).style('font-size', size => size + 'px')

    setTimeout(function () {
      p.data([1, 2, 3, 4, 5, 6]).text(t => t + 'x')
    }, 3000)

    setTimeout(function () {
      p.enter().append('p').text(d => d)
    }, 6000)

    setTimeout(function () {
      p.exit().remove()
    }, 9000)

    
    d3.histogram()
  </script>
</body>
</html>